<template>
  <div id="app">
    <img src="./assets/logo.png">
    <child :msg="msg" @chooseFn="alertFn"></child>
  </div>
</template>

<script>
import child from './components/child'

export default {
  name: 'App',
  components: {
    child
  },
  data(){
    return {
      msg:"传值"
    }
  },
  created(){
    this.$bus.$on("getSon",() => {
      this.msg = "这是孙子改的"
    })
  },
  methods:{
    alertFn(){
      this.msg = "hello ---> Vue"
    }
  }
}
</script>

<style>
</style>
